<?php
namespace App\Http\Controllers;
    use Illuminate\Http\Request;
    use Illuminate\Support\Facades\DB;
class HuyaController extends Controller{
    //后台登录显示页面
    public function huya_index(){
        return view("Huya/index");
    }
    //后台登录
    public function huya_login(){
        $info=$_POST;
        $data=DB::table("back_login")->where("username",$info['username'])->first();
        if($data){
            if($info['password']==$data->password){
                return redirect("huya_first");
            }else{
                return redirect("huya_index");
            }
        }
    }
    public function huya_edit(){
        return view("Huya/member-view");
    }
    public function huya_home(){
        return view("Huya/new");
    }
}
